/*
 * Copyright user2010
 * All rights reserved
 */

package org.myorg.totoBD.gui.swing.components.dialog;

import java.awt.Dimension;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import javax.swing.JTextField;

/**
 *
 * @author user
 */
public abstract class DlgConLoginAbs extends DlgConAbs{
    public DlgConLoginAbs(
            String title,
            String textDescription,
            Frame parent,
            boolean modal) throws Exception
    {
        super(textDescription, parent, modal);

        this.txfDataBaseName = new JTextField();

        Dimension dim = new Dimension (400,110);
        this.setTitle(title);
        this.setMinimumSize(dim);
        this.setSize(dim);


        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblTextBoxdef)
                    .addComponent(txfDataBaseName, javax.swing.GroupLayout.DEFAULT_SIZE, 383, Short.MAX_VALUE)
                    .addComponent(tmkGuiShrBtnGrpCommand, javax.swing.GroupLayout.Alignment.TRAILING))
                .addContainerGap()
             )
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblTextBoxdef)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(txfDataBaseName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)
                .addComponent(tmkGuiShrBtnGrpCommand, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pack();
    }


    public String getUser(){
        return strUser;
    }
    @Override
    protected abstract boolean _doJob() throws Exception;
    private String strUser =_dbConnection_.getUser();

    @Override
    public void actionPerformed(ActionEvent e) {
        super.actionPerformed(e);

    }
}
